﻿using Microsoft.Extensions.Options;
using NetCoreBBS.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace NetCoreBBS.Services
{
    public class MenuService : IMenuService
    {
        private readonly Menus _menus;

        public MenuService(IOptions<Menus> menusAccessor)
        {
            _menus = menusAccessor.Value;
        }

        public IEnumerable<Menu> GetFrontStageMenu()
        {
            var list = _menus.FrontStageList;
            return list;
        }
        public IEnumerable<Menu> GetBackStageMenu()
        {
            var list = _menus.BackStageList;
            return list;
        }
    }
}
